package com.gzy.cbrsystem.insomnia.action;

import com.gzy.cbrsystem.insomnia.util.Insomnia;
import com.gzy.cbrsystem.insomnia.util.InsomniaDAO;
import com.opensymphony.xwork2.ActionSupport;

public class ViewCaseDetail extends ActionSupport {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected String caseId;
	protected Insomnia insomnia;
	protected InsomniaDAO insomniaDAO;
	
	public String getCaseId() {
		return caseId;
	}

	public void setCaseId(String caseId) {
		this.caseId = caseId;
	}

	public Insomnia getInsomnia() {
		return insomnia;
	}

	public void setInsomnia(Insomnia insomnia) {
		this.insomnia = insomnia;
	}

	public InsomniaDAO getInsomniaDAO() {
		return insomniaDAO;
	}

	public void setInsomniaDAO(InsomniaDAO insomniaDAO) {
		this.insomniaDAO = insomniaDAO;
	}

	public String execute() throws Exception {
		this.setInsomnia(this.insomniaDAO.findByCaseId(this.getCaseId()));
		return SUCCESS;
	}	
}
